CloneContents Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Makes a deep clone of this Deque. A new Deque is created with a clone of each element of this set, by calling ICloneable.Clone on each element. If T is a value type, then each element is copied as if by simple assignment.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public Deque<T> CloneContents()
Visual Basic (Declaration)
Public Function CloneContents As Deque(Of T)
Visual C++
public:
Deque<T>^ CloneContents ()

Return Value

The cloned Deque.

Remarks

If T is a reference type, it must implement ICloneable. Otherwise, an InvalidOperationException is thrown.

Cloning the Deque takes time O(N), where N is the number of items in the Deque.

Exceptions

ExceptionCondition
System..::InvalidOperationExceptionT is a reference type that does not implement ICloneable.

See Also